#ifndef __ming_fyp_ObjectManager_h__
#define __ming_fyp_ObjectManager_h__

//------------------------------------------------------------------------------
// header includes
#include "fyp/core/String.h"
#include "fyp/core/Matrix.h"

#include <vector>
#include <map>

//------------------------------------------------------------------------------
namespace ming
{
namespace fyp
{
	namespace render
	{
		class IRenderer;
		class IRenderable;
		class IShader;
	}

	class TResourcePool;

	//--------------------------------------------------------------------------
	class TObjectManager
	{
	public:
		//------------------------------
		// #cstor & #dstor
		TObjectManager(TResourcePool *resPool);
		~TObjectManager();
		
		//------------------------------
		// external operations
		void Step(float dt);

		void NextCasterObject();

		void NextProjectiveTexture();

		void RenderCasterObject(
			render::IRenderer *renderer,
			render::IShader *shader);

		void RenderReceiverObject(
			render::IRenderer *renderer,
			render::IShader *shader);

		void RenderBasisVisualization(
			render::IRenderer *renderer,
			render::IShader *shader);

		void RenderLightVisualization(
			render::IRenderer *renderer,
			render::IShader *shader,
			const TMtx44 &xform);
		
	private:
		//------------------------------
		// internal attributes
		float mAccumTime;

		TResourcePool *mResPool;

		std::vector<TStr> mCasterAlias;
		std::vector<TStr> mProjTexAlias;
		size_t mCurCaster;
		size_t mCurProjTex;
		
		//------------------------------
		// internal operations
	};
	
	//--------------------------------------------------------------------------
}
}


#endif	//__ming_fyp_ObjectManager_h__